<nzi-form [formName]="applicationCreateForm" #groupCreateFormComponent>
  <form nz-form [formGroup]="applicationCreateForm">
    <!-- 添加防CSRF验证字段 -->
    <input type="hidden" formControlName="timestamp" />
    <input type="hidden" formControlName="nonce" />
    <nz-form-item>
      <!-- 分组名称 -->
      <nz-form-label nzFor="name">名称<span class="required-icon">*</span></nz-form-label>
      <nz-form-control>
        <input nz-input placeholder="请输入名称" formControlName="name" [readonly]="isReadonly">
        <ng-container *ngIf="getValidateForm('name').dirty && getValidateForm('name').errors">
          <nz-form-explain class="from-help input-group" *ngIf="applicationCreateForm.get('name').hasError('name')">
            {{nameDes}}
          </nz-form-explain>
          <nz-form-explain class="from-help input-group"
            *ngIf="applicationCreateForm.get('name').hasError('duplicated')">
            名称已经存在
          </nz-form-explain>
        </ng-container>
        <nz-form-explain *ngIf="!(getValidateForm('name').dirty && getValidateForm('name').errors)">{{nameDes}}
        </nz-form-explain>
      </nz-form-control>
    </nz-form-item>
    <!-- 描述 -->
    <nz-form-item>
      <nz-form-label nzFor="description">描述</nz-form-label>
      <nz-form-control>
        <textarea nz-input rows="4" formControlName="description" placeholder="请输入应用描述"
          [readonly]="isReadonly"></textarea>
        <ng-container *ngIf="getValidateForm('description').dirty && getValidateForm('description').errors">
          <nz-form-explain class="from-help input-group"
            *ngIf="applicationCreateForm.get('description').hasError('description')">
            最大支持500个英文字母、数字、空格、逗号、句号、中文
          </nz-form-explain>
        </ng-container>
        <nz-form-explain *ngIf="!(getValidateForm('description').dirty && getValidateForm('description').errors)">
          最大支持500个英文字母、数字、空格、逗号、句号、中文</nz-form-explain>
      </nz-form-control>
    </nz-form-item>
  </form>
</nzi-form>
